package com.example.archive.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * 受限档案访问申请实体类
 * 对应数据库表：restricted_archive_requests
 */
@Data
@TableName("restricted_archive_requests")
public class RestrictedArchiveRequest {
    
    @TableId(type = IdType.AUTO)
    private Integer requestId;
    
    private Integer userId;
    
    private Integer archiveId;
    
    private String reason;
    
    private String expectedDuration;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date requestTime;
    
    private Integer approverId;
    
    private String approvalStatus;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approvalTime;
    
    private String notes;
    
    // 查询结果中的扩展字段，不映射到数据库
    @TableField(exist = false)
    private String archiveTitle;
    
    @TableField(exist = false)
    private String userName;
    
    @TableField(exist = false)
    private String approverName;
    
    @TableField(exist = false)
    private String archiveType;
    
    @TableField(exist = false)
    private String securityLevel;
} 